package com.neutech.controller;

import com.neutech.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@CrossOrigin
@RestController
public class TestController {
    @Autowired
    private TestService testService;

    @ResponseBody
    @RequestMapping("/test")
    public void addTest()
    {
        testService.addTest();
    }

    @ResponseBody
    @RequestMapping("/test2")
    public List<Map<String, Object>> gettest()
    {

        return testService.queryTestList();

    }
}



